﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_IsThereUserByIdentificationCredentials')
	BEGIN
		DROP  Procedure [esf_sso].P_IsThereUserByIdentificationCredentials
	END

GO

CREATE Procedure [esf_sso].P_IsThereUserByIdentificationCredentials
	@pIdentificationTypeID	BIGINT
	,@pIdentificationNumber	VARCHAR (20)
	,@pPassword VARCHAR (160)
AS
	
	SELECT 
		TOP 1 1
	FROM
		[esf_sso].VUser VU
	WHERE
		VU.Usr_Per_IT_ID = @pIdentificationTypeID
		AND VU.Usr_Per_IdentificationNumber = @pIdentificationNumber
		AND VU.Usr_Password = @pPassword
GO 